<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.

return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'VKPlayer',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
	),

	'modules'=>array(
	),

	// application components
	'components'=>array(
		'Imhonet' => array(
			'class' => 'application.components.Imhonet',
			'apiUrl' => '',
		),
		'VKApi' => array(
			'class' => 'application.components.VKApi',
			'apiUrl' => 'http://api.vkontakte.ru/api.php',
			'apiVersion' => '3.0',
			'apiId' => '',
			'secret' => '',
		),	
		'CURL' => array(
			'class' => 'application.extensions.curl.Curl',
		),	
		'user'=>array(
			'class' => 'application.components.WebUser',
			'allowAutoLogin' => true,
		),
		'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
				'/' => 'site/index',
				'login' => 'site/login',
				'registration' => 'site/register',
				'format_query' => 'site/formatquery',
				'cookies' => 'site/cookieshack',
				'link_tracks' => 'player/linktracks',
				'playlist_sync' => 'player/playlistsync',
				'scrobble' => 'player/scrobble',
				'feedback' => 'player/feedback',
				'get_feedbacks' => 'player/getfeedbacks',
				'validate_user' => 'player/saveuser',
				'download/<query>' => 'player/download',
			),
			'showScriptName' => false,
		),
		'errorHandler'=>array(
		'errorAction'=>'site/error',
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
			),
		),
	),
	
	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'',
	),
);
